Enable /bigobj for compiler_generators on Windows#644
Closed
c8ef wants to merge 1 commit intofacebook:mainfrom
Closed
Enable /bigobj for compiler_generators on Windows#644c8ef wants to merge 1 commit intofacebook:mainfrom
/bigobj for compiler_generators on Windows#644c8ef wants to merge 1 commit intofacebook:mainfrom
Conversation
Merged
7 tasks
Contributor
Author
|
Hi @vitaut, could you please take a look at this patch? Thanks! |
Contributor
|
@vitaut has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
facebook-github-bot
pushed a commit
to facebook/hhvm
that referenced
this pull request
Mar 27, 2025
Summary: When building `fbthrift` statically on Windows, I encountered the following error. Enabling this flag on Windows should help resolve the issue. ``` FAILED: thrift/compiler/generate/CMakeFiles/compiler_generators.dir/t_mstch_rust_generator.cc.obj C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1443~1.348\bin\Hostx64\x64\cl.exe /TP -DTHRIFT_HAVE_LIBSNAPPY=0 -ID:\b\fbthrift\src\5.03.24.00-6181d269be.clean\. -ID:\b\fbthrift\x64-windows-static-dbg -external:ID:\installed\x64-windows-static\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /GR /EHsc /MP /MTd /Z7 /Ob0 /Od /RTC1 -std:c++17 /utf-8 /showIncludes /Fothrift\compiler\generate\CMakeFiles\compiler_generators.dir\t_mstch_rust_generator.cc.obj /Fdthrift\compiler\generate\CMakeFiles\compiler_generators.dir\compiler_generators.pdb /FS -c D:\b\fbthrift\src\5.03.24.00-6181d269be.clean\thrift\compiler\generate\t_mstch_rust_generator.cc D:\b\fbthrift\src\5.03.24.00-6181d269be.clean\thrift\compiler\generate\t_mstch_rust_generator.cc : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj [105/384] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1443~1.348\bin\Hostx64\x64\cl.exe /TP -DTHRIFT_HAVE_LIBSNAPPY=0 -ID:\b\fbthrift\src\5.03.24.00-6181d269be.clean\. -ID:\b\fbthrift\x64-windows-static-dbg -external:ID:\installed\x64-windows-static\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /GR /EHsc /MP /MTd /Z7 /Ob0 /Od /RTC1 -std:c++17 /utf-8 /showIncludes /Fothrift\compiler\generate\CMakeFiles\compiler_generators.dir\t_mstch_cpp2_generator.cc.obj /Fdthrift\compiler\generate\CMakeFiles\compiler_generators.dir\compiler_generators.pdb /FS -c D:\b\fbthrift\src\5.03.24.00-6181d269be.clean\thrift\compiler\generate\t_mstch_cpp2_generator.cc FAILED: thrift/compiler/generate/CMakeFiles/compiler_generators.dir/t_mstch_cpp2_generator.cc.obj C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1443~1.348\bin\Hostx64\x64\cl.exe /TP -DTHRIFT_HAVE_LIBSNAPPY=0 -ID:\b\fbthrift\src\5.03.24.00-6181d269be.clean\. -ID:\b\fbthrift\x64-windows-static-dbg -external:ID:\installed\x64-windows-static\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /GR /EHsc /MP /MTd /Z7 /Ob0 /Od /RTC1 -std:c++17 /utf-8 /showIncludes /Fothrift\compiler\generate\CMakeFiles\compiler_generators.dir\t_mstch_cpp2_generator.cc.obj /Fdthrift\compiler\generate\CMakeFiles\compiler_generators.dir\compiler_generators.pdb /FS -c D:\b\fbthrift\src\5.03.24.00-6181d269be.clean\thrift\compiler\generate\t_mstch_cpp2_generator.cc D:\b\fbthrift\src\5.03.24.00-6181d269be.clean\thrift\compiler\generate\t_mstch_cpp2_generator.cc : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj ninja: build stopped: subcommand failed. ``` X-link: facebook/fbthrift#644 Reviewed By: praihan Differential Revision: D71990661 Pulled By: vitaut fbshipit-source-id: 97ac05d817231e5c8688c68be7dcf02901ffa63f
Contributor
|
Merged, thanks! |
Contributor
Author
|
Thanks for your quick response! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When building
fbthriftstatically on Windows, I encountered the following error. Enabling this flag on Windows should help resolve the issue.